package priv.lirenhe.javabase.charpter03_4_04;

/**
 * 构造方法理解
 * TODO
 *
 * @author lirenhe
 * Mar 25, 2019 2:46:59 PM
 *
 */
public class Constructor02 {

	private String str01;
	private String str02;
	
	/**
	 * 初始化
	 */
	public Constructor02(){
		this.str01 = "";
		this.str02 = "";
	}
	
	public Constructor02(String str01,String str02){
		//理解this对象的含义
		this.str01 = str01;
		this.str02 = str02;
	}
	
	public static void main(String[] args) {
		Constructor02 obj = new Constructor02();
		System.out.println(obj.str01);
		System.out.println(obj.str02);
		
		Constructor02 obj02 = new Constructor02("有参","第二个形参");
		System.out.println(obj02.str01);
		System.out.println(obj02.str02);
	}
	

}
